package com.fanyafei.messagetouch;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fanyafei@sensedeal.ai
 * @date 2021/11/23
 */
@SpringBootApplication
@RestController
public class MessageTouchApplication {

    private final Logger logger = LoggerFactory.getLogger(MessageTouchApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(MessageTouchApplication.class,args);
    }

    @GetMapping("/hello")
    public String hello(@RequestParam(value = "hello") String name){
        logger.error("error logback for message-touch");
        logger.info("info logback for message-touch");
        return String.format("hello %s!",name);
    }


}
